import cv2

bodyer = cv2.CascadeClassifier("./haarcascades/haarcascade_upperbody.xml")


girl = cv2.imread("../asset/g/1.jpg")
gray = cv2.cvtColor(girl, cv2.COLOR_BGR2GRAY)

bodyes = bodyer.detectMultiScale(gray, 1.02, 3)
print(bodyes)
for (x, y, w, h) in bodyes:
    cv2.rectangle(girl, (x, y), (x + w, y + h), (0, 0, 255), 2)
while True:
    cv2.imshow('girl', girl)
    key = cv2.waitKey(10)
    if key & 0xFF == ord('q'):
        break
cv2.destroyAllWindows()
